package org.penguin.study.bk.base.query;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

/**
 * @author chengyinghua
 */
@Slf4j
@Data
public class QueryCondition implements Serializable {

    private static final long serialVersionUID = -2695081755711647720L;

    private String field;
    private String type;
    private String rule;
    private String val;

    @Override
    public String toString() {
        if (field == null || "".equals(field)) {
            return "";
        }
        StringBuffer sb = new StringBuffer();
        sb.append(this.field).append(" ").append(this.rule).append(" ").append(this.type).append(" ").append(this.val);
        return sb.toString();
    }
}
